/**
 * 功能描述
 */

define(function (require, exports, module) {
	var Dialog = require("dialog");
	var aw = require("ajaxwrapper");
	var store = require("store");
	var activeUser = store.get("user");
	
    module.exports = {
    		setTotal: function(editgrid,widget){
    			var datas = editgrid.getData();
    			var refund = 0;
    			for (var i = 0;i<datas.length;i++){
    				refund = refund + Number(datas[i].refund);
            	}
            	widget.get("form").setValue("totalAmount", refund.toFixed(2));
    		}

    };
});
